/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package models;

import java.util.Date;
import javax.persistence.*;
import play.data.binding.As;
import play.data.validation.Required;
import play.db.jpa.Model;

/**
 *
 * @author GJean
 */
@Entity
@Table(name = "customers")
public class Customer extends Model {

    @Required
    @As("dd/MM/yyyy")
    public Date dateinscription;
    @Required
    public Double amountdue;
    @Required
    public Double amountpaid;
    @Required
    public String picture;
    @Required
    @OneToOne
    public User user;

    public Customer(@As("dd/MM/yyyy") Date dateinscription, Double amountdue, Double amountpaid, String picture, User user) {
        this.dateinscription = dateinscription;
        this.amountdue = amountdue;
        this.amountpaid = amountpaid;
        this.picture = picture;
        this.user = user;


    }
}
